﻿using System.Configuration;

namespace Tilver.Configuration.Logging
{
    public class AppenderCollection : ConfigurationElementCollection
    {
        /// <summary>
        /// 生成新的配置节
        /// </summary>
        /// <returns></returns>
        protected override ConfigurationElement CreateNewElement()
        {
            return new AppenderElement();
        }
        /// <summary>
        /// 返回指定配置节的名称
        /// </summary>
        /// <param name="element"></param>
        /// <returns></returns>
        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((AppenderElement)element).Name;
        }
        /// <summary>
        /// 返回指定名称的配置节信息
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public new AppenderElement this[string name]
        {
            get { return (AppenderElement)BaseGet(name); }
        }
    }
}
